package model.vo {
    import mx.collections.ArrayCollection;

    [Bindable]
    public class GameVo {
        public var balance:Number;
        public var scoreRules:Array;
        public var level:int;
        public var score:int;
        public var eggs:int;
        public var state:int;
        public var win:int;
        public var maxLevel:int = 5;
        public var cellTypeRules:Array;
        public var scoreToEgg:Array;
        public var missionRulesList:Array;
        public var missionRules:Array;

        public function GameVo():void {
            this.state = Constants.GAME_STATE.PREPARING;
            this.level = 1;
            this.balance = 200;
            this.scoreRules = [100, 200, 300, 400, 500];
            this.scoreToEgg = [10, 15, 15, 20, 20];
            this.cellTypeRules = [4, 5, 5, 6, 6];
            this.missionRulesList = [[20, 20, 20, 20],
                                     [20, 20, 20, 20, 20],
                                     [25, 25, 25, 25, 25],
                                     [15, 15, 15, 15, 15, 15],
                                     [20, 20, 20, 20, 20, 20]];
            reset();
        }

        public function reset():void {
            this.score = 0;
            this.eggs = 0;
            this.win = 0;
            this.missionRules = this.missionRulesList[this.level - 1];
        }
    }
}

